package re;

import nfa.NFADesign;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.*;

/**
 * @author haoly
 * @title EmptyTest
 * @date 2025/4/17 11:00
 * @description 空正则表达式测试类
 */
public class EmptyTest {
    @Test
    void testAccepts() {
        Pattern pattern = new Empty();
        NFADesign nfaDesign = pattern.toNFADesign();

        assertTrue(nfaDesign.accepts(""));
        assertFalse(nfaDesign.accepts("a"));
    }
}
